<table>
  <thead>
    <tr>
      <?php foreach ($listaItems as $item): ?>
      <th><?php echo $item ?></th>
       <?php endforeach; ?>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($datos as $dato): ?>
    <tr>
      <?php  for($i=0; $i<count($listaItems); $i=$i+1){ ?>
      <td><?php echo $dato[$mascara[$i]] ?></td>
      <?php  } ?>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
<br><br><br>

